﻿
@model BBICMS.Model.SendEmail

@{
    ViewBag.Title = Title.ContactUs;
}

@section header{
    <link href="~/Content/iconfont/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/plugins/toastr/toastr.min.css" rel="stylesheet" />

}

<div class="page-contact">
    <div class="container">
       
            <div class="contactbox">
                <h2 class="title">Contact</h2>
                <aside>
                    <h3>USA careplus ins.</h3>
                    <ul>
                        <li><i class="iconfont icon-telephone"></i>
                            @Labels.Telephone  @SettingsManager.Contact.Phone
                        </li>
                        <li><i class="iconfont icon-mail"></i>
                        @Labels.EmailLabel @SettingsManager.Contact.MailTo</li>
                        <li><i class="iconfont icon-map-marker"></i>
                        @Labels.Address @Labels.CompayAddress</li>
                    </ul>
                </aside>
            </div>
    
    </div>
</div>
@*<div class="container">
    <div class="baidumap" id="map_canvas"></div>
</div>*@
<div class="contact-page">   
    <section class="container">
        <div class="row">
            <div class="col-xs-8 animated fadeInLeft">
                <h3 class="sectiontitle">
                    @ViewBag.Title
                </h3>
             
                <div class="sendform">
                    @using (Ajax.BeginForm("SendEmail", null, new AjaxOptions
                    {

                        HttpMethod = "POST",
                        OnBegin = "onBegin",
                        OnComplete = "onComplete",
                        OnSuccess = "updateSuccess"

                    }, new { role = "form" , @class= "sendform" }))
                    {
                        @Html.AntiForgeryToken()
                        @Html.ValidationSummary(true)

                        
                        <div class="form-group">
                           
                            @Html.TextBoxFor(m => m.Name, new { @class = "form-control", placeholder = Labels.Name })
                            @Html.ValidationMessageFor(model => model.Name)
                        </div>
                        <div class="form-group">
                          
                            @Html.TextBoxFor(m => m.Phone, new { @class = "form-control", placeholder = Labels.Phone })
                            @Html.ValidationMessageFor(model => model.Phone)
                        </div>
                        <div class="form-group">
                           
                            @Html.TextBoxFor(m => m.Email, new { @class = "form-control", placeholder = Labels.Email })
                            @Html.ValidationMessageFor(model => model.Email)
                        </div>
                        <div class="form-group">
                          
                            @Html.TextAreaFor(m => m.Body, new { @class = "form-control", placeholder = Labels.Message, rows="5" })
                            @Html.ValidationMessageFor(model => model.Body)
                        </div>
                        <div class="form-group text-center">
                            <button type="submit" class="btn btn-primary" id="btnSave"><i class="fa fa-paper-plane fa-fw"></i>  @Buttons.Send </button>
                        </div>                       

                    }
     

                </div>
            </div>
            <div class="col-xs-4 animated fadeInRight">
                <h3 class="sectiontitle">
                    @Labels.CompayName
                </h3>
                <figure class="m-b-15">
                    <img src="~/Content/Public/img/phone.jpg" class="img-responsive" />
                </figure>
                
                <ul class="contactus">
                    <li><i class="iconfont icon-marker"></i>@Labels.CompayAddress</li>
                    <li><i class="iconfont icon-nanshengmoren"></i>@Labels.Contact：@SettingsManager.Contact.ContactMan</li>
                    <li><i class="iconfont icon-mobile"></i>@Labels.Mobile：@SettingsManager.Contact.Mobile</li>
                    <li><i class="iconfont icon-phone"></i>@Labels.Phone：@SettingsManager.Contact.Phone</li>
                    <li><i class="iconfont icon-youxiangzhaohui"></i>@Labels.Email：<a href="mailto:@SettingsManager.Contact.MailTo">@SettingsManager.Contact.MailTo</a></li>
                 
                </ul>
               
            </div>
        </div>
    </section>
</div>

@section scripts{
@Scripts.Render("~/bundles/jqueryvalWithBootstrap")
<script src="~/plugins/toastr/toastr.min.js"></script>
<script language="javascript">
    function onBegin() {
        $("#btnSave i").removeClass("fa-paper-plane").addClass("fa-spinner fa-spin")
    }
    function onComplete() {
        $("#btnSave i").removeClass("fa-spinner fa-spin").addClass("fa-paper-plane")
    }
    function updateSuccess(data) {
        var title = '@ViewBag.Title';
        Common.ShowBox(data.Status, data.Message, title);
    }

        $(function () {
            //当前菜单
            $(".menu>ul>li:nth-of-type(6) a").addClass("active"); 
        })



    </script>

}